package run.core;

import java.util.ArrayList;
import java.util.List;

import run.Cell;
import run.Facet;
import run.IntFacet;

public class INT extends Cell {

	private Facet value;
	private Facet phantom;
		
	public INT(String valueLabel) {
		super("INT", valueLabel);
		value = new IntFacet(".value", this, OUTPUT_FACET, valueLabel);
	}
	
	@Override
	public List<Facet> stimulate(Facet stimmer)
	{
		return null;
	}
	
	public void secrete()
	{
	}
	
	//Dot printout method
	public String toDot(String prefix)
	{
		String returnString = "";
		returnString += "subgraph " + "cluster_" + cellTypeName + hashCode() + "{\n";
		returnString += "label = \"" + labelName + "\";\n";
		
		//Print my facets
		returnString += prefix + cellTypeName + hashCode() + "value [label=\".value\"];\n";
		
		returnString += "}\n";
		return returnString;
	}
	
	public List<Facet> getFacets()
	{
		ArrayList<Facet> temp = new ArrayList<Facet>();
		temp.add(phantom);
		temp.add(value);
		return temp;
	}
	
	/**
	 * Returns .value facet with preloaded number.
	 */
	public List<Facet> getOutFacets() {
		ArrayList<Facet> arrayList = new ArrayList<Facet>();
		arrayList.add(value);
		return arrayList;
		
	}
	
	public boolean isLiteral() {
		return true;
	}
}
